<?php
namespace Admin\Model;
use Think\Model;

class NoticeModel extends Model {


    public function getNoticeByWhere($where,$limit='') {
        is_null($where) && $where='';
        return $this->where($where)->order('addtime desc')->limit($limit)->select();
    }

    public function getCountByWhere($where) {
        is_null($where) && $where='';
        return $this->where($where)->count();
    }


    public function _add($data) {
        $flag = $this->add($data);
        if ($flag !== false) {
            return '000000';
        }

        return '111111';
    }


}